package com.guang.springbootjacson.controller;

import com.guang.springbootjacson.bean.TestTwoBean;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * 全局设置Date序列化之后的类型
 *   jackson:
 *     date-format: yyyy-MM-dd HH:mm:ss
 *     locale: zh
 *     time-zone: GMT+8
 *
 * @author liguang
 * @date 2022/6/1 16:38
 */
@RestController
public class TestTwoController {

    @RequestMapping(path = "two")
    public TestTwoBean getTestOneBean(){
        TestTwoBean testTwoBean = new TestTwoBean();
        testTwoBean.setDate(new Date());
        return testTwoBean;
    }
}
